<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/25 0025
 * Time: 15:32
 */

namespace app\index\model;
use think\Model;
use think\Db;

class Topic_management extends Model
{
    public function getTmanagement()
    {
        return $this::select();
    }
    public function addTmanagement($data)
    {
        if (empty($data) || !is_array($data)) {
            return false;
        }
        $data['optional'] = json_encode(explode(';',trim($data['optional'],';')));
        if($this ->save($data)){
            return true;
        }else{
            return false;
        }
    }
}